<?php $this->load->view('admin/_header2') ?>

<table id="tt" class="easyui-datagrid" style="width:960px;height:auto;">
	<thead>
	<tr height=32 >
    	<th field="name0" align=center  width=60 ></th>
		<th field="name1" align=center  width=100 >Book Date</th>
		<th field="name2" align=center  width=120 >Member</th>
		<th field="name3" align=center  width=60 >PNR</th>
		<th field="name4" align=center  width=100 >Flight date</th>
		<th field="name5" align=center  width=120 >Itinerary</th>
        <th field="name6" align=center  width=120 >Passenger</th>
        <th field="name7" align=center  width=100 >Total Price</th>
	</tr>
	</thead>
	<tbody>
	<?php
	
	$index=0;
	$sumPrice=0;
	foreach($result as $item)
	{
		$index++;
		$sumPrice += (float)($item->TotalPrice);
	?><tr align=center >
    	<td><?=$index ?></td>
		<td><?=date("Y-m-d",strtotime($item->BookDate)) ?></td>
		<td><?=$item->SalesName  ?></td>
        <td><?=$item->PNR  ?></td>
        <td><?=date("Y-m-d",strtotime($item->departdate))  ?></td>
        <td><?=substr($item->ItineraryName,-8)  ?></td>
        <td><?=$item->lPessengerName  ?></td>
		<td style="text-align:right" align=right><?=$item->TotalPrice  ?></td>
	</tr>
	<?php
	}
	?>
    <tr>
    	<td><strong>Total</strong></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td align="right"><strong><?=$sumPrice ?></strong></td>
    </tr>
    </tbody>
</table>

<?php $this->load->view('admin/_footer1') ?>